home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / MISC / HCAL-27 / COPWIRE.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1997-01-28  |  14.8 KB  |  537 lines

  1. 10  'COPWIRE : 15 DEC 85 rev. 27 SEP 96
  2. 20  IF EX$=""THEN EX$="EXIT"
  3. 30  CLS:KEY OFF
  4. 40  COLOR 7,0,1
  5. 50  PI=3.14159
  6. 60  UL$=STRING$(80,205)       'underline
  7. 70  ER$=STRING$(80,32)        'erase
  8. 80  U$="####.###"
  9. 90  V$="####.####"
  10. 100  DIM A(50,4)               'AWG sizes (American Wire Gauge)
  11. 110  DIM B(50,4)               'BSWG sizes (British Standard Wire Gauge)
  12. 120  '
  13. 130  '.....AWG wire sizes
  14. 140  '     AWG system: Geometrical progression of 39 wire sizes from #0000 AWG
  15. 150  '     to #36 AWG.
  16. 160  '     #0000 = 0.4600" dia. (maximum)
  17. 170  '     #36   = 0.005"  dia. (minimum)
  18. 180  '     Number of sizes = 39 (eventually extended to 50)
  19. 190  K#= (0.46/0.005)^(1/39)        'incremental multiplier
  20. 200  '     n = AWG gauge# + 3 (to allow for sizes #0, 00, 000 and 0000)
  21. 210  '     Wire diameter = 0.46 <UNK! {00F6}> K#^n
  22. 220    FOR Z=1 TO 50
  23. 230  N=Z+3
  24. 240  WIRE=0.46/K#^N         'wire diameter in inches
  25. 250  '     DC resistance per metre = 1/(<0xE3!>a<UNK! {FDEB}>) where:
  26. 260  '                           a = radius of wire in metres
  27. 270  '    conductivity of copper * = 5.8 * 10^7 mho/m
  28. 280  A=WIRE/2                       'wire radius
  29. 290  OHM=304.8/(58*PI*(A*25.4)^2)   'ohms per 1000 feet
  30. 300  '.....alternate calculation for ohms/1000 ft.
  31. 310  '.....CM=(WIRE*10^3)^2         'circular mils
  32. 320  '.....OHM=10,371/CM            'ohms per 1000 feet
  33. 330  A(Z,1)=WIRE
  34. 340  A(Z,2)=OHM
  35. 350    NEXT Z
  36. 360  '
  37. 370  '.....BSWG wire sizes
  38. 380  WIRE=0.324         'initial diameter
  39. 390  FOR Z=1 TO 50
  40. 400  IF Z<=3 THEN WIRE =WIRE-0.024:GOTO 530
  41. 410  IF Z<=6 THEN WIRE =WIRE-0.02:GOTO 530
  42. 420  IF Z<=10 THEN WIRE =WIRE-0.016:GOTO 530
  43. 430  IF Z<=14 THEN WIRE =WIRE-0.012:GOTO 530
  44. 440  IF Z<=19 THEN WIRE =WIRE-0.008:GOTO 530
  45. 450  IF Z<=23 THEN WIRE =WIRE-0.004:GOTO 530
  46. 460  IF Z<=26 THEN WIRE =WIRE-0.002:GOTO 530
  47. 470  IF Z<=28 THEN WIRE =WIRE-0.0016:GOTO 530
  48. 480  IF Z<=30 THEN WIRE =WIRE-0.0012:GOTO 530
  49. 490  IF Z<=39 THEN WIRE =WIRE-0.000799999:GOTO 530
  50. 500  IF Z<=49 THEN WIRE =WIRE-0.000399998:GOTO 530
  51. 510  WIRE=WIRE-0.000199999
  52. 520  '
  53. 530  B(Z,1)=WIRE
  54. 540  CIRC=(WIRE*10^3)^2     'circular mils
  55. 550  A=WIRE/2
  56. 560  OHM=304.8/(58*PI*(A*25.4)^2)   'resistance per 1000 feet
  57. 570  B(Z,2)=OHM
  58. 580  NEXT Z
  59. 590  '
  60. 600  '.....current in air
  61. 610  DATA 73,55,41,32,22,16,11
  62. 620  '.....current in cable
  63. 630  DATA 46,33,23,17,13,10,7.5,5
  64. 640  '
  65. 650  FOR Z=8 TO 20 STEP 2:READ A(Z,3):NEXT Z     'current in air
  66. 660  FOR Z=8 TO 22 STEP 2:READ A(Z,4):NEXT Z     'current in cable/bundles
  67. 670  '
  68. 680  '.....start
  69. 690  CLS
  70. 700  COLOR 15,2
  71. 710  PRINT" COPPER WIRE";TAB(57);"by George Murphy VE3ERP ";
  72. 720  COLOR 1,0:PRINT STRING$(80,223);
  73. 730  COLOR 7,0
  74. 740  PRINT " Press number in < > to choose standard units of measure:"
  75. 750  PRINT UL$;
  76. 760  PRINT "  < 1 >  Metric"
  77. 770  PRINT "  < 2 >  U.S.A./Imperial"
  78. 780  PRINT UL$;
  79. 790  PRINT "    or press <0> to EXIT....."
  80. 800  Z$=INKEY$
  81. 810  IF Z$="0"THEN CLS:RUN EX$
  82. 820  IF Z$="1"THEN UM=25.4:UM$="mm.":GOTO 850
  83. 830  IF Z$="2"THEN UM=1:UM$="in.":GOTO 850
  84. 840  GOTO 800
  85. 850  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  86. 860  GOSUB 4970
  87. 870  PRINT UL$;
  88. 880  PRINT " Press letter in < > for......"
  89. 890  PRINT UL$;
  90. 900  PRINT "  < a >  Copper wire table - metric/inch/AWG"
  91. 910  PRINT "  < b >  Copper wire table - metric/inch/BSWG"
  92. 920  PRINT "  < c >  Current carrying capacity of AWG sizes of copper wire"
  93. 930  PRINT "  < d >  DC resistance of copper wire"
  94. 940  PRINT "  < e >  RF resistance of copper wire"
  95. 950  PRINT "  < f >  Voltage drop in long wire runs"
  96. 960  PRINT "  < g >  Weight of copper wire"
  97. 970  PRINT "  < h >  Wire size conversions - metric/inch/AWG"
  98. 980  Z$=INKEY$
  99. 990  IF Z$="a"THEN GA$="A.W.G.":GOTO 1980
  100. 1000  IF Z$="b"THEN GA$="B.S.W.G.":GOTO 1980
  101. 1010  IF Z$="c"THEN 1690
  102. 1020  IF Z$="d"THEN 4100
  103. 1030  IF Z$="e"THEN 3450
  104. 1040  IF Z$="f"THEN 1150
  105. 1050  IF Z$="g"THEN 2860
  106. 1060  IF Z$="h"THEN 2640
  107. 1070  GOTO 980
  108. 1080  '
  109. 1090  '.....display input
  110. 1100  LOCATE CSRLIN-1:PRINT STRING$(7,32)
  111. 1110  LOCATE CSRLIN-1,39:PRINT STRING$(40,32)
  112. 1120  LOCATE CSRLIN-1,39:PRINT ".......";USING U$;Q;
  113. 1130  RETURN
  114. 1140  '
  115. 1150  '.....voltage drop
  116. 1160  CLS
  117. 1170  IF UM=1 THEN M=1:M$="ft."ELSE M=0.3048:M$="m."
  118. 1180  H$=" VOLTAGE DROP IN COPPER WIRE CONDUCTOR"
  119. 1190  COLOR 15,2
  120. 1200  PRINT H$;
  121. 1210  PRINT TAB(57);"by George Murphy VE3ERP ";
  122. 1220  COLOR 1,0:PRINT STRING$(80,223);
  123. 1230  COLOR 7,0
  124. 1240  PRINT " ENTER: Length of wire.........(";M$;")";:INPUT L:L=L/M
  125. 1250  IF L=0 THEN LOCATE CSRLIN-1:PRINT STRING$(78,32):LOCATE CSRLIN-1:GOTO 1240
  126. 1260  LG=INT(L*10*M+0.5)/10
  127. 1270  INPUT " ENTER: Current...............(amps)";I
  128. 1280  IF I=0 THEN LOCATE CSRLIN-1:PRINT STRING$(78,32):LOCATE CSRLIN-1:GOTO 1270
  129. 1290  INPUT " ENTER: Circular mils per amp (if applicable)...";CMA
  130. 1300  VIEW PRINT 3 TO 23:CLS:VIEW PRINT
  131. 1310  COLOR 2,2:LOCATE 1,1:PRINT STRING$(80,32);
  132. 1320  COLOR 15,2
  133. 1330  LOCATE 1,1:PRINT H$;LG;M$;" long @";I;"amp ";
  134. 1340  COLOR 7,0
  135. 1350  LOCATE 3
  136. 1360  FOR Z=1 TO 40
  137. 1370  CM=(A(Z,1)*1000)^2                     'circular mils
  138. 1380  R=A(Z,2)/1000*L                        'ohms/1000 ft.
  139. 1390  E=I*R                                  'voltage drop
  140. 1400  C=I*CMA:IF CM>=C THEN W=Z              'CMA = CM per amp.
  141. 1410  IF CM<C THEN COLOR 0,7 ELSE COLOR 7,0
  142. 1420  IF Z/2<>INT(Z/2)THEN LOCATE CSRLIN,1 ELSE LOCATE CSRLIN-1,42
  143. 1430  PRINT " #";
  144. 1440  IF Z<10 THEN PRINT " ";
  145. 1450  PRINT Z;"AWG";
  146. 1460  Z$="#####.####"
  147. 1470  IF R>=10   THEN Z$="######.###"
  148. 1480  IF R>=10^2 THEN Z$="#######.##"
  149. 1490  IF R>=10^3 THEN Z$="########.#"
  150. 1500  PRINT USING Z$;R;:PRINT " -";
  151. 1510  Z$="#####.####"
  152. 1520  IF E>=10   THEN Z$="######.###"
  153. 1530  IF E>=10^2 THEN Z$="#######.##"
  154. 1540  IF E>=10^3 THEN Z$="########.#"
  155. 1550  PRINT USING Z$;E;:PRINT " v."
  156. 1560  NEXT Z
  157. 1570  COLOR 7,0:PRINT UL$;
  158. 1580  FOR Z=2 TO 22:LOCATE Z,41:PRINT "OPEN":NEXT Z  'print vertical bar
  159. 1590  LOCATE 23,41:PRINT CHR$(202)
  160. 1600  PRINT " -= resistance of";LG;M$;" of wire,";
  161. 1610  PRINT " v.= voltage drop in";LG;M$;" of wire";
  162. 1620  IF W=40 THEN 1660
  163. 1630  COLOR 0,7:LOCATE 23,3
  164. 1640  PRINT" Current exceeds";CMA;"CM per amp capacity of wires smaller than";
  165. 1650  PRINT" AWG";W;
  166. 1660  COLOR 7,0
  167. 1670  GOTO 5190
  168. 1680  '
  169. 1690  '.....current carrying capacity
  170. 1700  CLS
  171. 1710  COLOR 15,2
  172. 1720  PRINT" CONTINUOUS-DUTY CAPACITY OF COPPER WIRE in AMPERES";
  173. 1730  PRINT TAB(57)"by George Murphy VE3ERP ";
  174. 1740  COLOR 1,0:PRINT STRING$(80,223);
  175. 1750  COLOR 7,0
  176. 1760  PRINT " Wire Size  Ohms/Mft.  ";
  177. 1770  PRINT " Single  Bunched   Chassis   500 cmA   700 cmA  1000 cmA"
  178. 1780  PRINT UL$;
  179. 1790     FOR Z=10 TO 40 STEP 2
  180. 1800  PRINT "  ";Z;" AWG";
  181. 1810  PRINT USING "######.###";A(Z,2);
  182. 1820  IF A(Z,3)=0 THEN PRINT "       - ";:GOTO 1840
  183. 1830  PRINT USING "#######.#";A(Z,3);
  184. 1840  IF A(Z,4)=0 THEN PRINT "       - ";:GOTO 1860
  185. 1850  PRINT USING "#######.#";A(Z,4);
  186. 1860  CM=(A(Z,1)*1000)^2
  187. 1870  PRINT USING "#######.##";CM/250;
  188. 1880  PRINT USING "#######.##";CM/550;
  189. 1890  PRINT USING "#######.##";CM/700;
  190. 1900  PRINT USING "#######.##";CM/1000
  191. 1910     NEXT Z
  192. 1920  PRINT" <Single> = Single wire in open air (e.g. power transmission line)."
  193. 1930  PRINT" <Bunched>= Wires or cables in conduits or bundles."
  194. 1940  PRINT" <Chassis>= Short point-to-point & general chassis wiring (250 cmA)."
  195. 1950  PRINT" <cmA>    = Circular mils per amp.(used in transformer design).";
  196. 1960  GOTO 5190
  197. 1970  '
  198. 1980  '.....wire table
  199. 1990  CLS
  200. 2000  COLOR 15,2
  201. 2010  PRINT " COPPER WIRE TABLE - ";GA$;" SIZES";
  202. 2020  PRINT TAB(57);"by George Murphy VE3ERP ";
  203. 2030  COLOR 1,0:PRINT STRING$(80,223);
  204. 2040  COLOR 7,0
  205. 2050  '
  206. 2060  FOR N=1 TO 40
  207. 2070  T=2:L=CSRLIN
  208. 2080  IF N/2=INT(N/2)THEN T=43:L=CSRLIN-1
  209. 2090  LOCATE L,T
  210. 2100  PRINT "#";USING "###";N;
  211. 2110  IF UM<>1 THEN 2330 ELSE 2130
  212. 2120  '
  213. 2130  '.....USA/IMPERIAL table
  214. 2140  IF GA$="A.W.G."THEN WIRE=A(N,1)ELSE WIRE=B(N,1)
  215. 2150  PRINT "  ";CHR$(237);USING ".####";WIRE;
  216. 2160  PRINT CHR$(34);
  217. 2170  CM=(WIRE*10^3)^2
  218. 2180  Z$="####,###"
  219. 2190  IF CM<10^4 THEN Z$="######.#"
  220. 2200  IF CM<10^3 THEN Z$="#####.##"
  221. 2210  IF CM<10^2 THEN Z$="####.###"
  222. 2220  IF CM<10   THEN Z$="###.####"
  223. 2230  PRINT USING Z$;CM;:PRINT " ^m";
  224. 2240  IF GA$="A.W.G."THEN OHM=A(N,2)ELSE OHM=B(N,2)
  225. 2250  Z$="####.####"
  226. 2260  IF OHM>=10   THEN Z$="#####.###"
  227. 2270  IF OHM>=10^2 THEN Z$="######.##"
  228. 2280  IF OHM>=10^3 THEN Z$="#######.#"
  229. 2290  PRINT USING Z$;OHM;
  230. 2300  PRINT " ";CHR$(234);"M"
  231. 2310  GOTO 2480
  232. 2320  '
  233. 2330  '.....Metric table
  234. 2340  IF GA$="A.W.G."THEN WIRE=A(N,1)ELSE WIRE=B(N,1)
  235. 2350  PRINT "  ";CHR$(237);USING "#.###";WIRE*UM;
  236. 2360  AR=(WIRE*UM/2)^2*PI
  237. 2370  Z$="#####.##":IF AR<10 THEN Z$="####.###"
  238. 2380  PRINT USING Z$;AR;:PRINT " mm<UNK! {FD22}>;
  239. 2390  IF GA$="A.W.G."THEN OHM=A(N,2)ELSE OHM=B(N,2)
  240. 2400  Z$="####.####"
  241. 2410  IF OHM/0.3048>=10   THEN Z$="#####.###"
  242. 2420  IF OHM/0.3048>=10^2 THEN Z$="######.##"
  243. 2430  IF OHM/0.3048>=10^3 THEN Z$="#######.#"
  244. 2440  PRINT USING Z$;OHM/0.3048;
  245. 2450  PRINT " -km"
  246. 2460  GOTO 2480
  247. 2470  '
  248. 2480   NEXT N
  249. 2490  '
  250. 2500  PRINT UL$;
  251. 2510  FOR Z=2 TO 22:LOCATE Z,41:PRINT CHR$(186):NEXT Z
  252. 2520  LOCATE 23,41:PRINT CHR$(202)
  253. 2530  IF UM=1 THEN 2590
  254. 2540  PRINT " ^ = Diameter (mm)";
  255. 2550  PRINT TAB(30);"mm<UNK! {FD20}>= cross-section area";
  256. 2560  PRINT TAB(67);"-km = Ohms/km";
  257. 2570  GOTO 2620
  258. 2580  '
  259. 2590  PRINT " ^ = Diameter (in.)";
  260. 2600  PRINT TAB(23);"^m=Circular Mils (wire diameter * 1000)";CHR$(253);
  261. 2610  PRINT TAB(65);CHR$(234);"M = Ohms/M ft.";
  262. 2620  GOTO 5190
  263. 2630  '
  264. 2640  '.....calculate size or gauge
  265. 2650  CLS
  266. 2660  COLOR 15,2
  267. 2670  PRINT " SOLID COPPER WIRE SIZES";
  268. 2680  PRINT TAB(57);"by George Murphy VE3ERP ";
  269. 2690  COLOR 1,0:PRINT STRING$(80,223);
  270. 2700  COLOR 7,0
  271. 2710  IF UM=1 THEN STD=1:GOTO 4490 ELSE STD=2:GOTO 2730
  272. 2720  '
  273. 2730  '.....metric wire sizes
  274. 2740  COLOR 15,2
  275. 2750  PRINT " METRIC:";
  276. 2760  COLOR 0,7
  277. 2770  PRINT " Press (1) to enter diameter,(2) to enter X-section area,";
  278. 2780  PRINT "(0) to quit..."
  279. 2790  COLOR 7,0
  280. 2800  Z$=INKEY$
  281. 2810  IF Z$="0"THEN LOCATE CSRLIN-1:PRINT ER$;:GOTO 5190
  282. 2820  IF Z$="1"THEN 4330
  283. 2830  IF Z$="2"THEN 4410
  284. 2840  GOTO 2800
  285. 2850  '
  286. 2860  '.....weight of copper wire
  287. 2870  CLS
  288. 2880  COLOR 15,2
  289. 2890  PRINT " WEIGHT OF SOLID COPPER WIRE";TAB(57);"by George Murphy VE3ERP ";
  290. 2900  COLOR 1,0:PRINT STRING$(80,223);
  291. 2910  COLOR 7,0
  292. 2920  PRINT " Press number in < > to choose unit of measurement of wire size:"
  293. 2930  PRINT UL$;
  294. 2940  PRINT "  < 1 >  AWG gauge #"
  295. 2950  PRINT "  < 2 >  Diameter in inches"
  296. 2960  PRINT "  < 3 >  Diameter in millimetres"
  297. 2970  PRINT UL$;
  298. 2980  W$=INKEY$
  299. 2990  IF W$="1"THEN SZ$="AWG #":D$=" AWG":GOTO 3030
  300. 3000  IF W$="2"THEN SZ$="dia. in inches":D$=CHR$(34)+" dia.":GOTO 3030
  301. 3010  IF W$="3"THEN SZ$="dia. in mm.":D$="mm dia.":GOTO 3030
  302. 3020  GOTO 2980
  303. 3030  PRINT " ENTER: Wire ";SZ$;"......";:INPUT X
  304. 3040  IF W$="1"THEN 3080
  305. 3050  IF W$="2"THEN R=X/2:GOTO 3130
  306. 3060  IF W$="3"THEN R=X/25.4/2:GOTO 3130
  307. 3070  '
  308. 3080  FOR Z=1 TO 40
  309. 3090  IF Z=X THEN 3110
  310. 3100  NEXT Z
  311. 3110  R=A(Z,1)/2          'radius
  312. 3120  '
  313. 3130  AR=PI*R^2           'cross-section area
  314. 3140  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  315. 3150  PRINT " Press number in < > to choose unit of measurement of wire length:"
  316. 3160  PRINT UL$;
  317. 3170  PRINT "  < 1 >  Feet"
  318. 3180  PRINT "  < 2 >  Metres"
  319. 3190  PRINT UL$;
  320. 3200  L$=INKEY$
  321. 3210  IF L$="1"THEN LG$="feet":GOTO 3240
  322. 3220  IF L$="2"THEN LG$="metres":GOTO 3240
  323. 3230  GOTO 3200
  324. 3240  PRINT " ENTER: Length of wire in ";LG$;"........";:INPUT L
  325. 3250  IF L$="1"THEN LG=L*12:GOTO 3270
  326. 3260  IF L$="2"THEN LG=L*3.048*12:GOTO 3270
  327. 3270  CU=AR*LG            'cubic inches of wire
  328. 3280  PCI=0.321            'weight of 1 cubic inch of copper
  329. 3290  WLB=CU*PCI          'weight in pounds
  330. 3300  LGLB=L/WLB          'length units per pound
  331. 3310  WKG=CU*PCI/2.2      'weight in kilograms
  332. 3320  LGKG=L/WKG          'length units per kilogram
  333. 3330  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  334. 3340  IF D$=" AWG"THEN Y$=" #"ELSE Y$=""
  335. 3350  PRINT " Weight of";L;LG$;" of";Y$;STR$(X);D$;" bare copper wire:";
  336. 3360  PRINT TAB(55);USING "###.##";WLB;:PRINT " lb."
  337. 3370  PRINT TAB(55);USING "###.##";WKG;:PRINT " Kg."
  338. 3380  PRINT UL$;
  339. 3390  PRINT " Base weight:";
  340. 3400  PRINT TAB(14);USING "##,###.#";LGLB;:PRINT " ";LG$;:PRINT "/lb."
  341. 3410  PRINT TAB(14);USING "##,###.#";LGKG;:PRINT " ";LG$;:PRINT "/Kg."
  342. 3420  PRINT UL$;
  343. 3430  GOTO 5190
  344. 3440  '
  345. 3450  '.....RF resistance
  346. 3460  CLS
  347. 3470  COLOR 15,2
  348. 3480  PRINT " RF Resistance of Copper Wire";TAB(57);"by George Murphy VE3ERP ";
  349. 3490  COLOR 1,0:PRINT STRING$(80,223);
  350. 3500  COLOR 7,0
  351. 3510  U=1            'permeability of copper
  352. 3520  UO=4*PI*10^-7  'permeability for vacuum in Henry per metre
  353. 3530  D=5.8*10^7     'conductivity of copper in mho/metre
  354. 3540  '
  355. 3550  PRINT " Press number in < > to choose method of entering wire size";
  356. 3560  PRINT UL$;
  357. 3570  PRINT "   < 1 > Diameter in millimetres"
  358. 3580  PRINT "   < 2 > Diameter in decimal inches"
  359. 3590  PRINT "   < 3 > Diameter in AWG gauge"
  360. 3600  Z$=INKEY$:IF Z$=""THEN 3600
  361. 3610  IF Z$="1"THEN Z$="mm.":GOTO 3650
  362. 3620  IF Z$="2"THEN Z$="in.":GOTO 3650
  363. 3630  IF Z$="3"THEN Z$="AWG":GOTO 3650
  364. 3640  GOTO 3600
  365. 3650  VIEW PRINT 3 TO 24:CLS:VIEW PRINT:LOCATE 3
  366. 3660  PRINT " Diameter of wire.............(";Z$;")";:INPUT Z
  367. 3670  IF Z$="mm."THEN MM=Z
  368. 3680  IF Z$="in."THEN MM=Z*25.4
  369. 3690  IF Z$="AWG"THEN MM=A(Z,1)*25.4
  370. 3700  LOCATE CSRLIN-1,31:PRINT USING V$;MM;:PRINT " mm =";USING V$;MM/25.4;
  371. 3710  PRINT " in.";
  372. 3720  IF Z$="AWG"THEN PRINT "  (#";Z;Z$;")" ELSE PRINT ""
  373. 3730  A=MM/2/10^3    '1/2 dia. of wire in metres
  374. 3740  '
  375. 3750  IF UM$="mm."THEN Z$=" m." ELSE Z$="ft."
  376. 3760  PRINT " Length of wire...............(";Z$;")";:INPUT L
  377. 3770  IF UM$="in."THEN L=L*0.3048
  378. 3780  LOCATE CSRLIN-1,31:PRINT USING V$;L;:PRINT " m. =";USING V$;L/0.3048;
  379. 3790  PRINT " ft."
  380. 3800  '
  381. 3810  INPUT " Frequency....................(MHz)";FZ
  382. 3820  LOCATE CSRLIN-1,31:PRINT USING V$;FZ;:PRINT " MHz"
  383. 3830  F=FZ*10^6
  384. 3840  '
  385. 3850  RDC=L*1/(PI*A^2*D)
  386. 3860  PRINT " DC resistance................";USING V$;RDC;:PRINT " -"
  387. 3870  '
  388. 3880  W=2*PI*F
  389. 3890  RE=L*1/(2*PI*A)*SQR(W*U*UO/(2*D))
  390. 3900  PRINT " Reactance....................";USING V$;RE;:PRINT " -"
  391. 3910  PRINT " RF surface resistance........";USING V$;RE;:PRINT " -";
  392. 3920  PRINT "   (same value as reactance)"
  393. 3930  '
  394. 3940  DS=SQR(2/(U*UO*W*D))*10^3
  395. 3950  PRINT " RF Penetration depth.........";USING V$;DS;:PRINT " mm =";
  396. 3960  PRINT USING V$;DS/25.4;:PRINT " in."
  397. 3970  PRINT UL$;
  398. 3980  LOCATE 15
  399. 3990  T=9
  400. 4000  PRINT TAB(T);
  401. 4010  PRINT "Program suggested by GNEWran Hosinsky, EA8YU, using formulae by"
  402. 4020  PRINT TAB(T);
  403. 4030  PRINT "SM0AQW in an article in QTC 1996 no.2, from original material"
  404. 4040  PRINT TAB(T);
  405. 4050  PRINT "published in Fundamental Electromagnetic Theory, by Ronald King"
  406. 4060  PRINT TAB(T);
  407. 4070  PRINT "(Dover Publications Inc.)"
  408. 4080  GOTO 5190
  409. 4090  '
  410. 4100  '.....DC resistance
  411. 4110  CLS
  412. 4120  COLOR 15,2
  413. 4130  PRINT " DC Resistance of Copper Wire";TAB(57);"by George Murphy VE3ERP ";
  414. 4140  COLOR 1,0:PRINT STRING$(80,223);
  415. 4150  COLOR 7,0
  416. 4160  PRINT " ENTER: Wire diameter..........(";UM$;")";:INPUT D
  417. 4170  IF UM=1 THEN D=D*25.4
  418. 4180  LOCATE CSRLIN-1
  419. 4190  PRINT "        Wire diameter..........";USING V$;D;
  420. 4200  PRINT " mm. =";USING V$;D/25.4;:PRINT " in."
  421. 4210  PRINT " ENTER: Wire length............(";UM$;")";:INPUT L
  422. 4220  IF UM=1 THEN L=L*25.4
  423. 4230  LOCATE CSRLIN-1
  424. 4240  IF L<1000 THEN M$=" mm. =":Z=L:ELSE M$=" m.  =":Z=L/10^3
  425. 4250  PRINT "        Wire length............";USING V$;Z;:PRINT M$;
  426. 4260  IF L/25.4<100 THEN M$=" in.":Z=L/25.4:ELSE M$=" ft.":Z=L/304.8
  427. 4270  PRINT USING V$;Z;:PRINT M$
  428. 4280  A=D/2       'radius of wire
  429. 4290  R=L/10^3/(PI*A^2*58)
  430. 4300  PRINT "        Resistance.............";USING V$;R;:PRINT " ohms"
  431. 4310  GOTO 5190
  432. 4320  ,
  433. 4330  '.....metric wire diameter
  434. 4340  LOCATE CSRLIN-1:PRINT ER$;:LOCATE CSRLIN-1
  435. 4350  COLOR 0,7:INPUT " ENTER: Diameter of wire (mm) ";M
  436. 4360  COLOR 7,0
  437. 4370  LOCATE CSRLIN-1:PRINT ER$;:LOCATE CSRLIN-1
  438. 4380  W=M/25.4
  439. 4390  GOTO 4580
  440. 4400  '
  441. 4410  '.....metric wire cross section area
  442. 4420  LOCATE CSRLIN-1:PRINT ER$;:LOCATE CSRLIN-1
  443. 4430  COLOR 0,7:INPUT " ENTER: Cross-section area of wire (mm<UNK! {FD29}> ";A
  444. 4440  COLOR 7,0
  445. 4450  LOCATE CSRLIN-1:PRINT ER$;:LOCATE CSRLIN-1
  446. 4460  W=SQR(A/PI)*2/25.4
  447. 4470  GOTO 4580
  448. 4480  '
  449. 4490  '.....AWG & decimal wire sizes
  450. 4500  COLOR 0,7
  451. 4510  INPUT" ENTER: AWG Gauge #, or Dia.in decimal inches, or 0 to quit..";W
  452. 4520  COLOR 7,0
  453. 4530  IF W=0 THEN LOCATE CSRLIN-1:PRINT ER$;:GOTO 5190
  454. 4540  LOCATE CSRLIN-1
  455. 4550  PRINT ER$;
  456. 4560  LOCATE CSRLIN-1
  457. 4570  '
  458. 4580  IF(W>0.3)AND(W<1)THEN BEEP:GOTO 4500
  459. 4590  IF W<1 THEN 4660
  460. 4600  GA=W
  461. 4610  GOSUB 4830                          'print line
  462. 4620  PRINT UL$;
  463. 4630  IF STD=1 THEN 4490
  464. 4640  IF STD=2 THEN 2730
  465. 4650  '
  466. 4660  FOR Z=40 TO 1 STEP-1
  467. 4670  IF A(Z,1)>=W THEN GA=Z:GOTO 4690
  468. 4680  NEXT Z
  469. 4690  GOSUB 4830
  470. 4700  COLOR 15,2
  471. 4710  PRINT " SOUGHT DIAMETER:     ";USING ".####";W;
  472. 4720  DI=W:GOSUB 4880
  473. 4730  COLOR 7,0
  474. 4740  FOR Z=1 TO 40
  475. 4750  IF A(Z,1)<W THEN GA=Z:GOTO 4770
  476. 4760  NEXT Z
  477. 4770  GOSUB 4830
  478. 4780  COLOR 7,0
  479. 4790  PRINT UL$;
  480. 4800  IF STD=1 THEN 4500
  481. 4810  IF STD=2 THEN 2730
  482. 4820  '
  483. 4830  '.....display wire table
  484. 4840  PRINT " AWG #";USING "##";GA;
  485. 4850  DI=A(GA,1)
  486. 4860  PRINT TAB(23);USING ".####";DI;
  487. 4870  '
  488. 4880  PRINT CHR$(34);" dia.";
  489. 4890  CM=(DI*1000)^2
  490. 4900  PRINT USING "###,###";CM;
  491. 4910  PRINT " c.m.   ( ";
  492. 4920  PRINT USING "#.##";DI*25.4;
  493. 4930  PRINT " mm dia.";USING "####.##";(DI*25.4/2)^2*PI;
  494. 4940  PRINT " mm";CHR$(253);" area )";
  495. 4950  RETURN
  496. 4960  '
  497. 4970  '.....preface
  498. 4980  T=8
  499. 4990  PRINT TAB(T);
  500. 5000  PRINT "Most of the values produced by this program are computed from"
  501. 5010  PRINT TAB(T);
  502. 5020  PRINT "basic equations to a precision of 7 significant figures, with no"
  503. 5030  PRINT TAB(T);
  504. 5040  PRINT "rounding off anywhere in the calculations except in the final"
  505. 5050  PRINT TAB(T);
  506. 5060  PRINT "screen display. Most long-established published tables consist of"
  507. 5070  PRINT TAB(T);
  508. 5080  PRINT "values that may have been rounded-off during chained calculations."
  509. 5090  PRINT TAB(T);
  510. 5100  PRINT "The resulting final truncated pubished values may not be as precise"
  511. 5110  PRINT TAB(T);
  512. 5120  PRINT "those produced by a computer. Because of this, you may find that"
  513. 5130  PRINT TAB(T);
  514. 5140  PRINT "HAMCALC calculations may not always agree to the last decimal place"
  515. 5150  PRINT TAB(T);
  516. 5160  PRINT "with our cherished handbooks!"
  517. 5170  RETURN
  518. 5180  '
  519. 5190  '.....end
  520. 5200  GOSUB 5240
  521. 5210  GOTO 680
  522. 5220  END
  523. 5230  '
  524. 5240  'HARDCOPY
  525. 5250  GOSUB 5360:LOCATE 25,2:COLOR 14,6
  526. 5260  PRINT " Press 1 to print screen, 2 to print screen & ";
  527. 5270  PRINT "advance paper, or 3 to continue.";:COLOR 7,0
  528. 5280  Z$=INKEY$:IF Z$="3"THEN GOSUB 5360:RETURN
  529. 5290  IF Z$="1"OR Z$="2"THEN GOSUB 5360:GOTO 5310
  530. 5300  GOTO 5280
  531. 5310  FOR QX=1 TO 24:FOR QY=1 TO 80
  532. 5320  LPRINT CHR$(SCREEN(QX,QY));
  533. 5330  NEXT QY:NEXT QX
  534. 5340  IF Z$="2"THEN LPRINT CHR$(12)
  535. 5350  GOTO 5250
  536. 5360  LOCATE 25,1:PRINT STRING$(80,32);:RETURN
  537.